/*
 * @Author: WangShuai 1830773767@qq.com
 * @Date: 2025-10-05 18:45:02
 * @LastEditors: WangShuai 1830773767@qq.com
 * @LastEditTime: 2025-10-08 22:55:19
 * @FilePath: \react_staging\src\App.jsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import React, { Component } from 'react'
import Search from'./components/Search'
import List from'./components/List'
import './App.css'
export default class App extends Component {
    //
    state={//初始化状态
        userList:[],//user初始值为数组
        isFirst:true,//是否为第一次打开页面
        isLoading:false,//标识是否处于加载中
        err:"",//存储请求相关错误信息
    }
    //更新App状态
    updataAppState = (stateObj)=>{
        console.log("App",stateObj)
        this.setState(stateObj)
    }
  render() {
    const {userList} = this.state
    return (
      <div className="container">
        <Search updataAppState={this.updataAppState}></Search>
        <List {...this.state}></List>
      </div>
    )
  }
}
